vector<int> reverseBookList(ListNode* head) {
    stack<int> stk;
    while(head)
    {
        stk.push(head->val);
        head = head->next;
    }
    vector<int> ans;
    while(!stk.empty())
    {
        ans.push_back(stk.top());
        stk.pop();
    }
    return ans;
}